home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / mailinglists / amigae.0993sept.archive / 000007_crash!cup.port….com!Politikill_Wed, 1 Sep 93 09:12:31 PST.msg < prev    next >
Internet Message Format  |  1994-05-26  |  4KB

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Wed, 1 Sep 93 09:12:31 PST
  3. Received: from nova.unix.portal.com by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0oXgNr-0000neC; Tue, 31 Aug 93 17:49 PDT
  5. Received: by nova.unix.portal.com (5.65b/4.1 1.425) 
  6.     id AA14797; Tue, 31 Aug 93 17:53:19 -0700
  7. Received: from hobo  by portal.unix.portal.com (1.734) 
  8.     id AA27148; Tue, 31 Aug 93 17:53:16 -0700
  9. Received: by hobo.corp.portal.com (4.1/4.0.3 1.74) 
  10.     id AA04249; Tue, 31 Aug 93 17:53:15 PDT
  11. Return-Path: <Politikill@cup.portal.com>
  12. Lines: 94
  13. Date: Tue, 31 Aug 93 17:53:14 PDT
  14. Message-Id: <9308311753.2.25589@cup.portal.com>
  15. X-Origin: The Portal System (TM)
  16. From: Politikill@cup.portal.com
  17. To: AmigaE@bkhouse.cts.com
  18. Subject: Object Help!
  19.  
  20. Don't worry, After September 9th you guyz won't have to worry about helping
  21. me! :-)
  22.     I am now working on reading in 15 lines each with 5 different sections,
  23. 4 of which need to be stored in a global variable, and then NOT TOUCHED.  I
  24. am using an object right now...I was using an ARRAY OF LONG but that didn't
  25. seem to work.  What is happening is that the final line is being put into
  26. where the previous lines information should be.  Here is what I have
  27.  
  28.  
  29. OBJECT user_object
  30.   usertext:LONG
  31.   usertype:LONG
  32.   usercomm:LONG
  33.   usermisc:LONG
  34. ENDOBJECT
  35.  
  36.   This is the object...I have fifteen (number of lines I need to read in)
  37. global variables defined as user_pref1:user_object...user_pref15:user_object.
  38.  
  39.  
  40. PROC getprefs()
  41. DEF prefshandle,
  42.     inline[80]:STRING
  43.   IF (FileLength('ENV:EDS.cfg')=-1) THEN RETURN
  44.   IF (prefshandle:=Open('ENV:EDS.cfg',OLDFILE))=NIL THEN RETURN
  45.   WHILE ReadStr(prefshandle,inline)<>-1 
  46.     IF (StrLen(inline)>1) THEN processprefs(inline)
  47.   ENDWHILE
  48.   Close(prefshandle)
  49. ENDPROC
  50.  
  51. PROC processprefs(in)
  52.   DEF bar1,
  53.       bar2,
  54.       bar3,
  55.       bar4,
  56.       gadnum,
  57.       gadnumtmp[3]:STRING
  58.  
  59.   bar1:=InStr(in,'|',0)
  60.   bar2:=InStr(in,'|',bar1+1)
  61.   bar3:=InStr(in,'|',bar2+1)
  62.   bar4:=InStr(in,'|',bar3+1)
  63.   MidStr(gadnumtmp,in,0,bar1)
  64.   gadnum:=Val(gadnumtmp,NIL)
  65.  
  66.   MidStr(gadtxt,in,bar1+1,bar2-bar1-1)
  67.   MidStr(type,in,bar2+1,bar3-bar2-1)
  68.   MidStr(command,in,bar3+1,bar4-bar3-1)
  69.   MidStr(misc,in,bar4+1,ALL)
  70.   IF gadnum=1
  71.     user_pref1.usertext:=gadtxt
  72.     user_pref1.usertype:=type
  73.     user_pref1.usercomm:=command
  74.     user_pref1.usermisc:=misc
  75.   ENDIF
  76.   IF gadnum=2
  77.     user_pref2.usertext:=gadtxt
  78.     user_pref2.usertype:=type
  79.     user_pref2.usercomm:=command
  80.     user_pref2.usermisc:=misc
  81.   ENDIF
  82. ENDPROC
  83.  
  84.   getprefs() is called at startup, before I open my window, where
  85. user_object.usertext for all 15 lines goes into the gadget text of 15
  86. different gadgets.  Then, when that gadget is selected, I am going to be
  87. executing the command of TYPE DOS or AREXX with COMMAND whats being
  88. executed, and MISC being the port for AREXX and ASL having an ASL requester
  89. get a file to append to COMMAND for TYPE DOS, etc. 
  90.  
  91.   If you haven't guessed, this is for a config file (goes in ENV:) which for
  92. now is only going to be edited with a seperate text editor.  Here are two
  93. example lines from the cfg file:
  94.  
  95. 001|NewShell|DOS|Newshell CON:10/16/620/257/CustomShell/CLOSE/SCREENEDS|#
  96. 002|Jump2End|REXX|(move {sf})|JED.2
  97.  
  98.   Also, if you are wondering, gadtxt...misc are being defined globally as
  99. STRINGs as thats the only way I could get information out of the process at
  100. all...HELP!
  101.  
  102.  / / /
  103. /_/_/iZ
  104.  
  105. MODULE 'WiZkId'
  106. PROC main()
  107.   wizkid.inetaddress:='Politikill@cup.portal.com'
  108.   wizkid.realname:='Jeffrey J Peden ]['
  109. ENDPROC
  110.  
  111.  
  112. *-- GammaTag Version 2.8 --*
  113. *-- WOMEN = Wild Ovulating Man-Eating Nymphomaniacs